package cn.edu.njpi;

import javafx.application.Application;
import javafx.application.Platform;
import javafx.geometry.Rectangle2D;
import javafx.stage.Screen;
import javafx.stage.Stage;

/**
 * @author 朱宗辉
 * @version V1.0
 * @Package cn.edu.njpi
 * @date 2022/5/10 8:36 PM
 */
public class Main extends Application {
    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage stage) throws Exception {
        Screen screen = Screen.getPrimary();
        System.out.println("primary.getDpi() = " + screen.getDpi());
        Rectangle2D bounds1 = screen.getBounds(); // 全部屏幕
        Rectangle2D bounds2 = screen.getVisualBounds(); // 可以看到的屏幕
        System.out.println("bounds1 = " + bounds1);
        System.out.println("bounds2 = " + bounds2);
        Platform.exit();
    }
}
